<{include file="../template/index/public/head.html"}>
<{include file="../template/index/public/nav.html"}>
<SCRIPT LANGUAGE="JavaScript">
    <!--//目的是为了做风格方便
    document.write('<div class="wrap">');
    //-->
</SCRIPT>
<!--
-->
<link rel="stylesheet" type="text/css" href="/static/theme/yjfshop/css/productbencandy.css">

<div class="mainbanner"><a href='#' target=_blank><img src='/static/theme/yjfshop/images/banner1.jpg'  width='990'  height='205' border='0' /></a></div>
<div class="nav_guide">
    <a href="/">首页</a>  -&gt; <A href='/'>产品服务</A> 
</div>
<div class="MainContainer">
    <div class="side">
        <div class="sortcont">
            <div class="head">产品分类</div>
            <div class="cont">

                <{volist name="productTree" id="item"}>
                <dl>
                    <dt><a href="/index/product/index/id/<{$item.id}>"><{$item.name}></a></dt>

                    <{if condition="(isset($item.sub))"}>
                    <{volist name="$item.sub" id="v"}>
                    <dd><a href="/index/product/index/id/<{$v.id}>"><{$v.name}></a></dd>
                    <{/volist}>
                    <{/if}>

                </dl>
                <{/volist}>

            </div>
        </div>
        <div class="thenewest">
            <div class="head">最新产品</div>
            <div class="cont">

                <{volist name="newsProduct" id="item"}>
                <dl>
                    <dt>
                    <div>
                        <a href="/index/product/product/id/<{$item.id}>" target="_blank">
                            <img src="<{$item.cover}>" width="80" />
                        </a>
                    </div>
                    </dt>
                    <dd>
                        <div class="t"><a href="/index/product/product/id/<{$item.id}>" target="_blank"><{$item.name}></a></div>
                        <div class="c">
                            <{$item.desc}>
                        </div>
                    </dd>
                </dl>
                <{/volist}>

            </div>
        </div>
    </div>
    <div class="main">
        <div class="listtitle">
            <div class="head">产品</div>
            <div class="cont">
                <div class="title"><{$product.name}></div>
                <SCRIPT>
                    //开始最左边的记录下标
                    var b_startIndex=1;
                    //显示5条记录
                    var b_showNum = 4;
                    function brightRollImg(){
                        var imgLength = document.getElementById("brandLength").value ;
                        var endIndex = b_startIndex + b_showNum;
                        if(imgLength >b_showNum && endIndex<imgLength){
                            document.getElementById("Span"+b_startIndex).style.display = "none";
                            document.getElementById("Span"+endIndex).style.display = "inline";
                            b_startIndex += 1;
                        }
                    }
                    function bleftRollImg(){
                        var imgLength = document.getElementById("brandLength").value ;
                        var endIndex = b_startIndex + b_showNum - 1;
                        if(b_startIndex>1){
                            b_startIndex -= 1;
                            document.getElementById("Span"+b_startIndex).style.display = "inline";
                            document.getElementById("Span"+endIndex).style.display = "none";
                        }
                    }
                </SCRIPT>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td class="showimg">
                            <div id="Bigimg">
                                <div id="Tab1">
                                    <a href="javascript:;" target="_blank">
                                        <img src="<{$product.cover}>" height="300" alt="1">
                                    </a>
                                </div>
                            </div>

                        </td>
                        <td class="showinfo">
                            <div class="price">单价：<span><{$product.price}></span> 元</div>
                            <div class="m">发布时间：<span><{$product.create_time}></span> </div>
                            <div class="m">浏览量：<span><{$product.pv}></span>次</div>


                            <div class="sub"><a href="javascript:;" target="_blank"><img src="/static/theme/yjfshop/images/submit.gif" onclick="addToCart(<{$product.id}>);"/></a></div>

                        </td>
                    </tr>
                </table>
                <div class="mhead">
                    <div id="Span101">详细信息</div>

                </div>
                <div class="mcont">
                    <table width="100%" cellspacing="0" cellpadding="0" style='TABLE-LAYOUT: fixed;WORD-WRAP: break-word' id="Tab101">
                        <tr>
                            <td class="contenta"><p style="text-indent: 2em;">
                                <{$product.productData.content}>
                            </td>
                        </tr>
                    </table>



                </div>
            </div>
        </div>
    </div>
    <div class="cleardiv"></div>
</div>

<!--
-->
<SCRIPT LANGUAGE="JavaScript">
    <!--//目的是为了做风格方便
    document.write('</div>');
    //-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
    <!--
    clickEdit.init();
    //-->
</SCRIPT>
<script type="text/javascript">

    function addToCart(id){
        $.post("/index/cart/addOne",{id:id},function(data){
            data = JSON.parse(data);
            if(data.code == 1){
                alert("添加到购物车成功");
            }
        });
    }
</script>
<{include file="../template/index/public/foot.html"}>
</body>
</html>
